package com.chinaunicom.system.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.chinaunicom.system.dto.RoleDto;
import com.chinaunicom.system.model.Role;

public interface RoleMapper {
    int deleteByPrimaryKey(Integer nRoleid)throws Exception;

    int insert(Role record)throws Exception;

    int insertSelective(Role record)throws Exception;

    Role selectByPrimaryKey(Integer nRoleid)throws Exception;

    int updateByPrimaryKeySelective(Role record)throws Exception;

    int updateByPrimaryKey(Role record)throws Exception;

	List<Role> query() throws Exception;

	List<Role> queryByName(@Param("vRolename")String vRolename);

	void saveRoleAndMenu(@Param("roleid")Integer roleid, @Param("mid")Integer mid);

	RoleDto queryById(Integer id) throws Exception;

	void deleteMenuByRoleId(Integer getnRoleid)throws Exception;

	void deleteUserByRoleId(Integer id);

}